import React, { Component } from 'react'
import { Label, RadioButton } from 'rc-easyui';
export default class Sex extends Component {
  render() {
    return (
      <div className="radio">
        <p>性别：</p>
        {
          this.props.fruits.map(fruit => {
            return (
              <div key={fruit}>
                <RadioButton
                  inputId={fruit}
                  value={fruit}
                  groupValue={this.props.fruit}
                  onChange={(checked) => this.props.showSex(fruit, checked)}
                />
                <Label htmlFor={fruit} style={{ margin: '0 5px' }}>{fruit}</Label>
              </div>
            )
          })
        }
      </div>
    )
  }
}
